#!/bin/bash

app_name=$1
if [[ $app_name = "" ]];
then
  echo "未指定服务名称"
fi

docker run -it --rm --name build_$app_name -v `pwd`:/app -v ~/deploy/service/maven:/maven docker.io/maven:3.8-jdk-8-slim /bin/bash -c "cd /app/$app_name && mvn -s /maven/settings.xml -Dmaven.repo.local=/maven/repo -DskipTests=true clean package"

